package mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.sun.org.apache.regexp.internal.recompile;

import model.Goods;
import model.User;

public class GoodsMapper implements RowMapper {

	   public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		     Goods g = new Goods();
		      
		      /*g.setId(rs.getInt("id"));*/
		       g.setGoodId(rs.getString("goodId"));
				g.setName(rs.getString("name"));
				g.setDiscountPrice(rs.getFloat("discountPrice"));
				g.setMarketPrice(rs.getFloat("marketPrice"));
				g.setStock(rs.getInt("stock"));
				g.setState(rs.getString("state"));
				g.setBeginDate(rs.getDate("beginDate"));
		      return g;
	   }

	




	 
}
